<template>
    <div class="doctor_cell" @click="lookDetail">
        <div class="avatar">
            <!-- <van-image :src="IMAGEURL + info.doctorLogo" class="img" lazy-load v-if="info.doctorLogo" /> -->
            <li-image :src="info.doctorLogo" class="img" lazy-load :is-preview="false" v-if="info.doctorLogo" :alt="`${$cookies.get('city')}-${info.doctorName}口腔医生执业资格`" />
            <TextLogo :name="info.textLogo" v-else-if="info.textLogo"></TextLogo>
            <van-image :src="require('@/assets/images/avatar/doctor_circle.png')" class="img" lazy-load :alt="`${$cookies.get('city')}-${info.doctorName}口腔医生执业资格`"  v-else />
        </div>
        <div class="info">
            <div class="title">
                <span class="name">{{ info.doctorName }}</span>
                <span class="sub">{{ info.titleName }}</span>
                <img src="@/assets/images/inquire/hot.png" class="img" alt="" v-if="hot && index < 3" />
            </div>
            <div class="rate">
                <span class="num">执业编号：{{ info.practiceLicenseNumber }}</span>
            </div>
            <div class="address">
                <span>{{ info.cityName }}</span>
                <span class="lili_divider"></span>
                <span>{{ info.hospitalNames }}</span>
            </div>
        </div>
</div>
</template>
<script>
import config from "@/http/config";
import TextLogo from '@/components/logo/index.vue'
export default {
    name: 'SearchDoctor',
    components:{
        TextLogo
    },
    props: {
        info: {
            type: Object,
            default: function () {
                return {}
            }
        },
        index: {
            type: Number,
            default: 0,
        },
        hot: {
            type: Boolean,
            default: true
        }
    },
    data() {
        return {
            IMAGEURL: config.IMAGEURL,
        }
    },
    created() {

    },
    methods: {
        // 查看详情
        lookDetail() {
            let id = this.info.id;
            this.$router.push({
                path: `/inquire/doctor/${id}`,
            })
        }
    }
}
</script>
<style lang="less" scoped>@import './search_doctor.less';</style>